import React, { Component } from 'react';
import Style from './Navigation.less';
import Back from './img/back.png';

class Navigation extends Component {

  handleClick = (e) => {
		if(typeof this.props.onClick === 'function') {
			this.props.onClick(e);
		} else {
			return;
		}
	}

  render() {
    return (
      <div
          style={{backgroundColor: this.props.backgroundColor || "#fff"}}
		  onClick={this.props.leftHandle || null}
		  className={Style.navigation}>
		<div className={Style.back}
			 onClick={this.props.leftHandle || null}
			 style={{color: this.props.ctextColor || "#2799ff"}}>
            <img src={Back} alt="返回"/>
			{this.props.left || null}</div>
		  <div className={Style.context} style={{color: this.props.ctextColor || "#2799ff"}}>
              {this.props.context || null}
          </div>
		<div  style={{color: this.props.ctextColor || "#2799ff"}} className={Style.more} onClick={this.props.rightHandle || null}>{this.props.right || null}</div>
      </div>
    )
  }
}

export default Navigation